package com.neusoft.his.sys.service.impl;

import com.neusoft.his.sys.entity.CommonResult;
import com.neusoft.his.sys.entity.Emp;
import com.neusoft.his.sys.mapper.EmpMapper;
import com.neusoft.his.sys.service.IEmpService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 东软教育集团
 * @since 2022-08-24
 */
@Service
public class EmpServiceImpl extends ServiceImpl<EmpMapper, Emp> implements IEmpService {
	@Autowired
	EmpMapper empMapper;

	@Override
	public CommonResult getAll() {
		List<Emp> les =  list();
		CommonResult result = null;
		if (les==null ||les.size()==0) {
			result = new CommonResult<>();
			result.setStatus(404);
		}else {
			result = new CommonResult<List<Emp>>(les);
		}
		return result;
	}

}
